﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="RecordsCenter.aspx.cs" EnableEventValidation="false" Inherits="SiteRecord.RecordsCenter" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .myCountdown
        {
            width: 95%;
            min-height: 300px;
            padding: 10px;
            margin: 0 auto;
        }
        .m-datagrid td, .datagrid td
        {
            height: 30px;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            $('.m-tab-trigger').click(function () {
                var self = $(this);
                var targetID = "#" + self.attr("arial-controls");

                $('.m-tab-trigger').removeClass("m-tab-trigger-on");
                self.addClass("m-tab-trigger-on");

                $('.m-tab-content').addClass("m-hide");
                $(targetID).removeClass("m-hide").fadeIn('fast');
            })

            $('.m-datagrid tbody tr').hover(function () { $(this).addClass("m-datagrid-selected"); }, function () { $(this).removeClass("m-datagrid-selected"); })



            var datePicker = $(".myDatePicker").datePicker({
                "format": "YYYY/MM/DD",
                "from": "2012/08/05",
                "to": "2014/11/25"
            });

            var ch_tran = $(".Crawl_Transition").transition();
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContainer" runat="server">
    <div>
        <h1 class="container" style="text-align: center; margin: 20px 0;">
            Site Record Center
        </h1>
        <div class="YOUR_SELECTOR_TabNavigator m-tabNavigator">
            <ul class="m-tabNavigator-triggers" role="tablist">
                <li><a href="#tab1-b" class="m-tab-trigger m-tab-trigger-on m-tab" role="tab" arial-controls="tab1-b">
                    收录情况</a></li>
                <li><a href="#tab2-b" class="m-tab-trigger m-tab" role="tab" arial-controls="tab2-b">
                    录入网站</a></li>
                <li><a href="#tab3-b" class="m-tab-trigger m-tab" role="tab" arial-controls="tab3-b">
                    设置</a></li>
            </ul>
            <div class="m-box m-tabNavigator-content" role="presentation">
                <div id="tab1-b" class="m-tab-content" aria-hidden="false" role="tabpanel">
                    <fieldset>
                        <p class="m-form-row">
                            <label for="val_date">
                                筛选:
                            </label>
                            <input type="text" clientidmode="Static" runat="server" id="val_date" class="myDatePicker" placeholder="DD/MM/YYYY" />
                            <asp:Button ID="btSearch" runat="server" Text="查询" CssClass="m-btn m-secondary m-skin" OnClick="btSearch_Click" />
                            <asp:Button ID="Btn_Export" runat="server" OnClick="Btn_ExportClick" CssClass="m-btn m-secondary m-skin" Text="导出到Excel" />
                        </p>
                    </fieldset>
                    <asp:GridView ID="RecordsView" CssClass="m-datagrid" runat="server" OnRowDataBound="RecordsView_RowDataBound"
                        AllowPaging="True" OnPageIndexChanging="RecordsView_PageIndexChanging" 
                        PageSize="20" AutoGenerateColumns="False">
                        <Columns>
                            
                            <asp:HyperLinkField DataNavigateUrlFields="链接" 
                                DataNavigateUrlFormatString="http://{0}" Target="_blank" 
                                DataTextField="链接" HeaderText="站点名" />
                             
                            <asp:HyperLinkField DataNavigateUrlFields="链接" 
                                DataNavigateUrlFormatString="http://{0}" Target="_blank" DataTextField="收录数" HeaderText="收录数" />
                            
                            <asp:BoundField DataField="最后收录时间" HeaderText="最后收录时间" />
                            <asp:BoundField DataField="抓取时间" HeaderText="抓取时间" />
                            <asp:HyperLinkField DataNavigateUrlFields="链接" 
                                DataNavigateUrlFormatString="http://{0}" DataTextField="链接" HeaderText="链接" 
                                Target="_blank" />
                        </Columns>
                        <HeaderStyle CssClass="m-table-hearder" />
                        <PagerSettings Mode="NextPreviousFirstLast" NextPageText="下一页" PreviousPageText="上一页" />
                    </asp:GridView>
                </div>
                <div id="tab2-b" class="m-js-hide m-tab-content m-hide" role="tabpanel" aria-hidden="true">
                    <h3>
                        域名列表，第一次使用后会存到数据库里，以后有域名了自动累加
                    </h3>
                    <label for="val_date">
                    </label>
                    <asp:TextBox ID="rb_SiteList" TextMode="MultiLine" CssClass="myCountdown" runat="server">
                    </asp:TextBox>
                    <p>
                        <asp:Button ID="bt_get" runat="server" Text="获取" UseSubmitBehavior="false" CssClass="m-btn m-secondary m-skin Crawl_Transition" OnClick="bt_get_Click" />
                    </p>
                </div>
                <div id="tab3-b" class="m-js-hide m-tab-content m-hide" role="tabpanel" aria-hidden="true">

                    <p class="m-form-row">
                        <label for="autoRefish">
                            更新方式:
                        </label>
                        <asp:CheckBox ClientIDMode="Static" ID="autoRefish" runat="server" Text="每天05点及13点自动更新" ToolTip="每天05点及13点自动更新" />
                    </p>
                    
                    <p class="m-form-row">
                        <label for="tbSearchEngine">
                            搜索引擎:
                        </label>
                        <asp:TextBox ClientIDMode="Static" ID="tbSearchEngine" Width="300px" runat="server"></asp:TextBox>
                    </p>

                    <p class="m-form-row">
                        <label for="tbSearchEnginePrefix">
                            后缀:
                        </label>
                        <asp:TextBox ClientIDMode="Static" ID="tbSearchEnginePrefix" runat="server"></asp:TextBox>
                    </p>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
